(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

dec(Cons(Nil, Nil)) → Nil
dec(Cons(Nil, Cons(x, xs))) → dec(Cons(x, xs))
dec(Cons(Cons(x, xs), Nil)) → dec(Nil)
dec(Cons(Cons(x', xs'), Cons(x, xs))) → dec(Cons(x, xs))
isNilNil(Cons(Nil, Nil)) → True
isNilNil(Cons(Nil, Cons(x, xs))) → False
isNilNil(Cons(Cons(x, xs), Nil)) → False
isNilNil(Cons(Cons(x', xs'), Cons(x, xs))) → False
nestdec(Nil) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
nestdec(Cons(x, xs)) → nestdec(dec(Cons(x, xs)))
number17(n) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
goal(x) → nestdec(x)

Rewrite Strategy: INNERMOST

(1) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5]
transitions:
Cons0(0, 0) → 0
Nil0() → 0
True0() → 0
False0() → 0
dec0(0) → 1
isNilNil0(0) → 2
nestdec0(0) → 3
number170(0) → 4
goal0(0) → 5
Nil1() → 1
Cons1(0, 0) → 6
dec1(6) → 1
Nil1() → 7
dec1(7) → 1
True1() → 2
False1() → 2
Nil1() → 8
Nil1() → 11
Cons1(8, 11) → 10
Cons1(8, 10) → 9
Cons1(8, 9) → 9
Cons1(8, 9) → 3
dec1(6) → 12
nestdec1(12) → 3
Cons1(8, 9) → 4
nestdec1(0) → 5
Nil1() → 12
dec1(7) → 12
Cons1(8, 9) → 5
nestdec1(12) → 5
Nil2() → 13
Nil2() → 16
Cons2(13, 16) → 15
Cons2(13, 15) → 14
Cons2(13, 14) → 14
Cons2(13, 14) → 3
Cons2(13, 14) → 5

(2) BOUNDS(1, n^1)

(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

dec(Cons(Nil, Nil)) → Nil
dec(Cons(Nil, Cons(z0, z1))) → dec(Cons(z0, z1))
dec(Cons(Cons(z0, z1), Nil)) → dec(Nil)
dec(Cons(Cons(z0, z1), Cons(z2, z3))) → dec(Cons(z2, z3))
isNilNil(Cons(Nil, Nil)) → True
isNilNil(Cons(Nil, Cons(z0, z1))) → False
isNilNil(Cons(Cons(z0, z1), Nil)) → False
isNilNil(Cons(Cons(z0, z1), Cons(z2, z3))) → False
nestdec(Nil) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
nestdec(Cons(z0, z1)) → nestdec(dec(Cons(z0, z1)))
number17(z0) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
goal(z0) → nestdec(z0)
Tuples:

DEC(Cons(Nil, Nil)) → c
DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Nil)) → c2(DEC(Nil))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
ISNILNIL(Cons(Nil, Nil)) → c4
ISNILNIL(Cons(Nil, Cons(z0, z1))) → c5
ISNILNIL(Cons(Cons(z0, z1), Nil)) → c6
ISNILNIL(Cons(Cons(z0, z1), Cons(z2, z3))) → c7
NESTDEC(Nil) → c8
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
NUMBER17(z0) → c10
GOAL(z0) → c11(NESTDEC(z0))
S tuples:

DEC(Cons(Nil, Nil)) → c
DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Nil)) → c2(DEC(Nil))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
ISNILNIL(Cons(Nil, Nil)) → c4
ISNILNIL(Cons(Nil, Cons(z0, z1))) → c5
ISNILNIL(Cons(Cons(z0, z1), Nil)) → c6
ISNILNIL(Cons(Cons(z0, z1), Cons(z2, z3))) → c7
NESTDEC(Nil) → c8
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
NUMBER17(z0) → c10
GOAL(z0) → c11(NESTDEC(z0))
K tuples:none
Defined Rule Symbols:

dec, isNilNil, nestdec, number17, goal

Defined Pair Symbols:

DEC, ISNILNIL, NESTDEC, NUMBER17, GOAL

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11

(5) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

GOAL(z0) → c11(NESTDEC(z0))
Removed 8 trailing nodes:

NUMBER17(z0) → c10
ISNILNIL(Cons(Cons(z0, z1), Nil)) → c6
NESTDEC(Nil) → c8
ISNILNIL(Cons(Cons(z0, z1), Cons(z2, z3))) → c7
ISNILNIL(Cons(Nil, Cons(z0, z1))) → c5
DEC(Cons(Nil, Nil)) → c
ISNILNIL(Cons(Nil, Nil)) → c4
DEC(Cons(Cons(z0, z1), Nil)) → c2(DEC(Nil))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

dec(Cons(Nil, Nil)) → Nil
dec(Cons(Nil, Cons(z0, z1))) → dec(Cons(z0, z1))
dec(Cons(Cons(z0, z1), Nil)) → dec(Nil)
dec(Cons(Cons(z0, z1), Cons(z2, z3))) → dec(Cons(z2, z3))
isNilNil(Cons(Nil, Nil)) → True
isNilNil(Cons(Nil, Cons(z0, z1))) → False
isNilNil(Cons(Cons(z0, z1), Nil)) → False
isNilNil(Cons(Cons(z0, z1), Cons(z2, z3))) → False
nestdec(Nil) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
nestdec(Cons(z0, z1)) → nestdec(dec(Cons(z0, z1)))
number17(z0) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
goal(z0) → nestdec(z0)
Tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
S tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
K tuples:none
Defined Rule Symbols:

dec, isNilNil, nestdec, number17, goal

Defined Pair Symbols:

DEC, NESTDEC

Compound Symbols:

c1, c3, c9

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

isNilNil(Cons(Nil, Nil)) → True
isNilNil(Cons(Nil, Cons(z0, z1))) → False
isNilNil(Cons(Cons(z0, z1), Nil)) → False
isNilNil(Cons(Cons(z0, z1), Cons(z2, z3))) → False
nestdec(Nil) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
nestdec(Cons(z0, z1)) → nestdec(dec(Cons(z0, z1)))
number17(z0) → Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Cons(Nil, Nil)))))))))))))))))
goal(z0) → nestdec(z0)

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

dec(Cons(Nil, Nil)) → Nil
dec(Cons(Nil, Cons(z0, z1))) → dec(Cons(z0, z1))
dec(Cons(Cons(z0, z1), Nil)) → dec(Nil)
dec(Cons(Cons(z0, z1), Cons(z2, z3))) → dec(Cons(z2, z3))
Tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
S tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
K tuples:none
Defined Rule Symbols:

dec

Defined Pair Symbols:

DEC, NESTDEC

Compound Symbols:

c1, c3, c9

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
We considered the (Usable) Rules:

dec(Cons(Cons(z0, z1), Cons(z2, z3))) → dec(Cons(z2, z3))
dec(Cons(Nil, Nil)) → Nil
dec(Cons(Cons(z0, z1), Nil)) → dec(Nil)
dec(Cons(Nil, Cons(z0, z1))) → dec(Cons(z0, z1))
And the Tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(Cons(x1, x2)) = [2] + x2   
POL(DEC(x1)) = [2]x1   
POL(NESTDEC(x1)) = [3]x1   
POL(Nil) = 0   
POL(c1(x1)) = x1   
POL(c3(x1)) = x1   
POL(c9(x1, x2)) = x1 + x2   
POL(dec(x1)) = 0   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

dec(Cons(Nil, Nil)) → Nil
dec(Cons(Nil, Cons(z0, z1))) → dec(Cons(z0, z1))
dec(Cons(Cons(z0, z1), Nil)) → dec(Nil)
dec(Cons(Cons(z0, z1), Cons(z2, z3))) → dec(Cons(z2, z3))
Tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
S tuples:none
K tuples:

DEC(Cons(Nil, Cons(z0, z1))) → c1(DEC(Cons(z0, z1)))
DEC(Cons(Cons(z0, z1), Cons(z2, z3))) → c3(DEC(Cons(z2, z3)))
NESTDEC(Cons(z0, z1)) → c9(NESTDEC(dec(Cons(z0, z1))), DEC(Cons(z0, z1)))
Defined Rule Symbols:

dec

Defined Pair Symbols:

DEC, NESTDEC

Compound Symbols:

c1, c3, c9

(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(12) BOUNDS(1, 1)